]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
lookingGlass: Don't hide scroll bar manually
authorFlorian Müllner <fmuellner@gnome.org>
Wed, 15 Nov 2023 12:43:24 +0000 (13:43 +0100)
committerMarge Bot <marge-bot@gnome.org>
Sat, 18 Nov 2023 18:00:43 +0000 (18:00 +0000)
The code predates the policy properties, which provide a cleaner
way of achieving the desired behavior.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3020>

js/ui/lookingGlass.js

index 3b3c7462554a568d411f82aa01ee8199c7495eb4..8da25d6b4c9c9b9dd84d039ceb5683b5a1c19734 100644 (file)
@@ -162,8 +162,11 @@ const Notebook = GObject.registerClass({
         labelBox.add_child(label);
         this.tabControls.add_child(labelBox);
 
-        const scrollview = new St.ScrollView({y_expand: true, child});
-        scrollview.hscroll.hide();
+        const scrollview = new St.ScrollView({
+            child,
+            hscrollbar_policy: St.PolicyType.NEVER,
+            y_expand: true,
+        });
 
         const tabData = {
             child,
@@ -387,6 +390,7 @@ class ObjInspector extends St.ScrollView {
     _init(lookingGlass) {
         super._init({
             pivot_point: new Graphene.Point({x: 0.5, y: 0.5}),
+            hscrollbar_policy: St.PolicyType.NEVER,
         });
 
         this._obj = null;
@@ -394,7 +398,6 @@ class ObjInspector extends St.ScrollView {
 
         this._parentList = [];
 
-        this.hscroll.hide();
         this._container = new St.BoxLayout({
             name: 'LookingGlassPropertyInspector',
             style_class: 'lg-dialog',